<template>
  <!-- 表单 -->
  <el-form :model="formData" :rules="rules" label-width="120px" :inline="true">
    <el-form-item label="菜单名称" prop="permission_name">
      <el-input v-model="formData.permission_name" style="width:90%" />
    </el-form-item>
    <el-form-item label="菜单地址" prop="route">
      <el-input v-model.trim="formData.route" style="width:90%" />
    </el-form-item>
    <el-form-item label="组件地址" prop="component">
      <el-input v-model="formData.component" style="width:90%" />
    </el-form-item>
    <el-form-item label="权限标识" prop="permission_mark">
      <!-- <el-switch
            v-model="formData.enVisible"
            active-value="1"
            inactive-value="0"
          /> -->
      <el-input v-model="formData.permission_mark" style="width:90%" />
    </el-form-item>
    <el-form-item label="菜单图标" prop="icon">
      <el-input v-model="formData.icon" style="width:90%" />
    </el-form-item>
    <el-form-item label="Redirect" prop="redirect">
      <el-input v-model="formData.redirect" style="width:90%" placeholder="请输入Redirect" />
    </el-form-item>
    <el-form-item label="是否外链" prop="islink">
      <el-radio v-model.number="formData.islink" :label="1">是</el-radio>
      <el-radio v-model.number="formData.islink" :label="2">否</el-radio>
    </el-form-item>
    <el-form-item label="排序">
      <el-input-number v-model.number="formData.sort" :min="1" :max="10" label="1" />
    </el-form-item>
    <el-form-item label="Hidden" prop="hidden">
      <el-radio v-model.number="formData.hidden" :label="1">是</el-radio>
      <el-radio v-model.number="formData.hidden" :label="2">否</el-radio>
    </el-form-item>
    <el-form-item label="KeepAlive" class="KeepAlive" prop="keepalive">
      <el-radio v-model.number="formData.keepalive" :label="1">是</el-radio>
      <el-radio v-model.number="formData.keepalive" :label="2">否</el-radio>
    </el-form-item>
  </el-form>
</template>

<script>
export default {
  name: 'StudyAdminFormmenu',
  data() {
    return {
      list: [], // 权限列表
      formData: {
        // id: '', // id
        permission_name: '', // 名称
        route: '', // 菜单地址
        component: '', // 组件地址
        permission_mark: '', // 权限标识
        icon: '', // 图标
        redirect: '', // redirect
        keepalive: 2, // keepalive
        hidden: 2, // hidden
        islink: 2, // islink
        sort: 1, // 排序
        parent_id: 0,
        type: 1
      },
      rules: {
        permission_name: [{ required: true, message: '名称必须', trigger: 'blur' }],
        route: [{ required: true, message: '菜单标识必须', trigger: 'blur' }],
        permission_mark: [{ required: true, message: '标识必须', trigger: 'blur' }]
      }
    }
  },
  mounted() {
  },
  methods: {
  }
}
</script>

<style  scoped>
.KeepAlive{
  margin-left: 40px;
}
</style>
